#include "Camera.h"

#include "InputHandler.h"
#include "Utility.h"
#include "GameGlobals.h"
#include "Resources.h"

LINKCLASSTONAME("camera", Camera);

Camera::Camera(sf::RenderWindow *App) : BaseEntity(App)
{
	DrawOrder = 0;
	pRender = App;

	mView.SetSize(pRender->GetWidth(), pRender->GetHeight());
	mView.Zoom(pRender->GetHeight() / 800.f);
	pRender->SetView(mView);

	sf::Vector2<float> Pos(0, 0);
	SetPos(0,0);
}

Camera::~Camera(void)
{
}

void Camera::Think()
{

}

void Camera::Draw()
{
	mView.SetSize(pRender->GetWidth(), pRender->GetHeight());
	mView.Zoom(800.f / pRender->GetHeight());
	mView.SetCenter(GetSFMLPos());
	pRender->SetView(mView);
}